<?php /* Smarty version 2.6.19, created on 2009-02-02 11:48:59
         compiled from admin/admin_users.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'admin/admin_users.tpl', 33, false),array('function', 'math', 'admin/admin_users.tpl', 96, false),)), $this); ?>
<?php echo '
<script type="text/javascript">
<!--
function confirmDelete(articleId) {
if (confirm("This will delete this user. Continue?"))
document.location = "admin.php?page=users&action=delete&id=" + articleId;
}
//-->
</script>
'; ?>

<h2>User Manager</h2>
<?php if (( $this->_tpl_vars['action'] == 'done' ) || ( $this->_tpl_vars['action'] == '' )): ?>
<?php if ($this->_tpl_vars['addallowed']): ?><div class="toplinks"><a href="admin.php?page=users&amp;subpage=add_user" title="Add User"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/add.png" alt="Add User" border="0" /></a>
</div><?php endif; ?>
<?php if ($this->_tpl_vars['numusers'] > 0): ?>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="table sortable-onload-2 rowstyle-alt paginate-15" id="sortTable">
<thead>
<tr> 
  <th width="120" class="smallhead"></th>
  <th class="smallhead sortable">Username</th>
  <th width="200" class="smallhead sortable">Groups</th>
  <th width="100" class="smallhead sortable-date">Last Login</th>
  <th width="90" class="smallhead sortable-numeric">Login Count</th>
</tr>
  </thead>
  <tbody>
<?php unset($this->_sections['users']);
$this->_sections['users']['name'] = 'users';
$this->_sections['users']['loop'] = is_array($_loop=$this->_tpl_vars['numusers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['users']['show'] = true;
$this->_sections['users']['max'] = $this->_sections['users']['loop'];
$this->_sections['users']['step'] = 1;
$this->_sections['users']['start'] = $this->_sections['users']['step'] > 0 ? 0 : $this->_sections['users']['loop']-1;
if ($this->_sections['users']['show']) {
    $this->_sections['users']['total'] = $this->_sections['users']['loop'];
    if ($this->_sections['users']['total'] == 0)
        $this->_sections['users']['show'] = false;
} else
    $this->_sections['users']['total'] = 0;
if ($this->_sections['users']['show']):

            for ($this->_sections['users']['index'] = $this->_sections['users']['start'], $this->_sections['users']['iteration'] = 1;
                 $this->_sections['users']['iteration'] <= $this->_sections['users']['total'];
                 $this->_sections['users']['index'] += $this->_sections['users']['step'], $this->_sections['users']['iteration']++):
$this->_sections['users']['rownum'] = $this->_sections['users']['iteration'];
$this->_sections['users']['index_prev'] = $this->_sections['users']['index'] - $this->_sections['users']['step'];
$this->_sections['users']['index_next'] = $this->_sections['users']['index'] + $this->_sections['users']['step'];
$this->_sections['users']['first']      = ($this->_sections['users']['iteration'] == 1);
$this->_sections['users']['last']       = ($this->_sections['users']['iteration'] == $this->_sections['users']['total']);
?>
<tr class="text" style="vertical-align:middle">
  <td class="text"><div align="center"><?php if ($this->_tpl_vars['editallowed']): ?><a href="admin.php?page=users&amp;subpage=user_edit&amp;action=Edit&amp;id=<?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['id']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/edit.gif" alt="Edit <?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['uname']; ?>
's uinfo" title="Edit <?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['uname']; ?>
's uinfo" border="0" /></a><?php else: ?><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/edit_grey.gif" alt="Edit disabled" title="Edit disabled" border="0" /><?php endif; ?>&nbsp;&nbsp;<a href="admin.php?page=users&amp;subpage=users_view&amp;id=<?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['id']; ?>
" ><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/page.gif" alt="View <?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['uname']; ?>
's uinfo" title="View <?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['uname']; ?>
's uinfo" border="0"/></a>&nbsp;&nbsp;<a href="admin.php?page=users&amp;subpage=usergroups&amp;uid=<?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['id']; ?>
" ><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/group.png" alt="<?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['uname']; ?>
 Groups" title="<?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['uname']; ?>
 Groups" border="0"/></a>&nbsp;&nbsp;<?php if ($this->_tpl_vars['ownerallowed']): ?><a href="admin.php?page=owners&amp;uid=<?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['id']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/group.gif" alt="<?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['uname']; ?>
 Items" title="<?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['uname']; ?>
 Items" border="0"/></a><?php else: ?><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/group_grey.gif" border="0" alt="Not allowed to change owners" title="Not allowed to change owners" /><?php endif; ?>&nbsp;&nbsp;<?php if ($this->_tpl_vars['deleteallowed'] && ( $this->_tpl_vars['row'][$this->_sections['users']['index']]['uname'] != $this->_tpl_vars['uname'] ) && ! $this->_tpl_vars['limitgroup']): ?><a href="javascript:confirmDelete('<?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['id']; ?>
')"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/delete.gif"  border="0" alt="Delete <?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['uname']; ?>
" title="Delete <?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['uname']; ?>
" /></a><?php else: ?><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/delete_grey.gif"  border="0" alt="Delete disabled" title="Delete disabled" /><?php endif; ?>
</div></td>
  <td class="text" <?php if ($this->_tpl_vars['row'][$this->_sections['users']['index']]['uname'] == $this->_tpl_vars['uname']): ?>style="border:2px solid #0F0;"<?php elseif ($this->_tpl_vars['row'][$this->_sections['users']['index']]['status'] == 0): ?>style="border:2px solid #00f;"<?php elseif ($this->_tpl_vars['row'][$this->_sections['users']['index']]['status'] == -1): ?>style="border:2px solid #f00;"<?php endif; ?>><span class="hintanchor"title="Information for <?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['uname']; ?>
 :: <?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['detail']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/information.png" alt="[i]"/></span><?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['uname']; ?>
</td>
  <td class="text"><?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['team']; ?>
</td>
  <td class="text"><?php if ($this->_tpl_vars['row'][$this->_sections['users']['index']]['lastlogin'] > 0): ?><?php echo ((is_array($_tmp=$this->_tpl_vars['row'][$this->_sections['users']['index']]['lastlogin']+$this->_tpl_vars['timeoffset'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d") : smarty_modifier_date_format($_tmp, "%Y-%m-%d")); ?>
<?php else: ?>Never logged in<?php endif; ?></td>
  <td style="text-align:center" class="text"><?php echo $this->_tpl_vars['row'][$this->_sections['users']['index']]['logincount']; ?>
</td>
</tr>
<?php endfor; endif; ?>
</tbody>
</table>
<div>
<strong>Key: </strong>
<span style="border:2px solid #0F0;padding:1px;">Yourself</span>&nbsp;<span style="border:2px solid #00F;padding:1px;">Inactive user</span>&nbsp;<span style="border:2px solid #F00;padding:1px;">Blocked user</span>&nbsp;
</div>
<?php else: ?>
<div align="center">No Users</div>
<?php endif; ?>
<?php elseif ($this->_tpl_vars['action'] == 'Edit'): ?>
<form name="form1" method="post" onsubmit="return checkForm([['usernames','text',true,0,0,''],['email','email',true,0,0,''],['firstname','text',true,0,0,''],['lastname','text',true,0,0,'']<?php if ($this->_tpl_vars['numfields'] > 0): ?><?php unset($this->_sections['fields']);
$this->_sections['fields']['name'] = 'fields';
$this->_sections['fields']['loop'] = is_array($_loop=$this->_tpl_vars['numfields']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['fields']['show'] = true;
$this->_sections['fields']['max'] = $this->_sections['fields']['loop'];
$this->_sections['fields']['step'] = 1;
$this->_sections['fields']['start'] = $this->_sections['fields']['step'] > 0 ? 0 : $this->_sections['fields']['loop']-1;
if ($this->_sections['fields']['show']) {
    $this->_sections['fields']['total'] = $this->_sections['fields']['loop'];
    if ($this->_sections['fields']['total'] == 0)
        $this->_sections['fields']['show'] = false;
} else
    $this->_sections['fields']['total'] = 0;
if ($this->_sections['fields']['show']):

            for ($this->_sections['fields']['index'] = $this->_sections['fields']['start'], $this->_sections['fields']['iteration'] = 1;
                 $this->_sections['fields']['iteration'] <= $this->_sections['fields']['total'];
                 $this->_sections['fields']['index'] += $this->_sections['fields']['step'], $this->_sections['fields']['iteration']++):
$this->_sections['fields']['rownum'] = $this->_sections['fields']['iteration'];
$this->_sections['fields']['index_prev'] = $this->_sections['fields']['index'] - $this->_sections['fields']['step'];
$this->_sections['fields']['index_next'] = $this->_sections['fields']['index'] + $this->_sections['fields']['step'];
$this->_sections['fields']['first']      = ($this->_sections['fields']['iteration'] == 1);
$this->_sections['fields']['last']       = ($this->_sections['fields']['iteration'] == $this->_sections['fields']['total']);
?><?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['required'] && ( $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 1 || $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 2 )): ?>,['<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
', 'text', true, 0, 0, '']<?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 6): ?>,['<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
', 'date', <?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['required']): ?>true<?php else: ?>false<?php endif; ?>, 0, 0, '']<?php endif; ?><?php endfor; endif; ?><?php endif; ?>]);" action="">
<div align="center">
<div class="formlist">
<div class="field">
<fieldset>
<legend>Website Access</legend>
<div class="fieldItem"><label for="usernames" class="label">Username<span class="hintanchor"title="Please don't forget to inform the user of any username changes"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><?php if (! $this->_tpl_vars['limitgroup']): ?><input name="usernames" id="usernames" type="text" size="40" value="<?php echo $this->_tpl_vars['uinfo']['uname']; ?>
" class="inputbox" onblur="checkElement('usernames', 'text', true, 0, 0, '');" /><br /><span class="fieldError" id="usernamesError">Required</span><?php else: ?><?php echo $this->_tpl_vars['uinfo']['uname']; ?>
<?php endif; ?></div></div><br />
    
<?php if (! $this->_tpl_vars['limitgroup']): ?>
 <div class="fieldItem"><label for="passwords" class="label">Password<span class="hintanchor"title="Please don't forget to inform the user of any password changes"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input name="passwords" id="passwords" type="text" size="40" class="inputbox" /></div></div><br />
<?php endif; ?>
    
<div class="fieldItem"><label for="status" class="label">Status<span class="hintanchor"title="If a user's status is set to inactive the user will not be able to login."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><?php if (! $this->_tpl_vars['limitgroup']): ?><select name="status" id="status" class="inputbox">
<option value="1" <?php if ($this->_tpl_vars['uinfo']['status'] == 1): ?>selected="selected"<?php endif; ?>>Active</option>
<option value="0" <?php if ($this->_tpl_vars['uinfo']['status'] == 0): ?>selected="selected"<?php endif; ?>>Inactive</option>
<option value="-1" <?php if ($this->_tpl_vars['uinfo']['status'] == -1): ?>selected="selected"<?php endif; ?>>Block</option>
</select><?php else: ?><?php if ($this->_tpl_vars['uinfo']['status'] == 1): ?>Active<?php elseif ($this->_tpl_vars['uinfo']['status'] == 0): ?>Inactive<?php else: ?>Blocked<?php endif; ?><?php endif; ?></div></div><br />
    
<div class="fieldItem"><label for="zone" class="label">Timezone<span class="hintanchor"title="The users timezone."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><select name="zone" id="zone" class="inputbox">
<?php unset($this->_sections['zones']);
$this->_sections['zones']['name'] = 'zones';
$this->_sections['zones']['loop'] = is_array($_loop=$this->_tpl_vars['numzones']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['zones']['show'] = true;
$this->_sections['zones']['max'] = $this->_sections['zones']['loop'];
$this->_sections['zones']['step'] = 1;
$this->_sections['zones']['start'] = $this->_sections['zones']['step'] > 0 ? 0 : $this->_sections['zones']['loop']-1;
if ($this->_sections['zones']['show']) {
    $this->_sections['zones']['total'] = $this->_sections['zones']['loop'];
    if ($this->_sections['zones']['total'] == 0)
        $this->_sections['zones']['show'] = false;
} else
    $this->_sections['zones']['total'] = 0;
if ($this->_sections['zones']['show']):

            for ($this->_sections['zones']['index'] = $this->_sections['zones']['start'], $this->_sections['zones']['iteration'] = 1;
                 $this->_sections['zones']['iteration'] <= $this->_sections['zones']['total'];
                 $this->_sections['zones']['index'] += $this->_sections['zones']['step'], $this->_sections['zones']['iteration']++):
$this->_sections['zones']['rownum'] = $this->_sections['zones']['iteration'];
$this->_sections['zones']['index_prev'] = $this->_sections['zones']['index'] - $this->_sections['zones']['step'];
$this->_sections['zones']['index_next'] = $this->_sections['zones']['index'] + $this->_sections['zones']['step'];
$this->_sections['zones']['first']      = ($this->_sections['zones']['iteration'] == 1);
$this->_sections['zones']['last']       = ($this->_sections['zones']['iteration'] == $this->_sections['zones']['total']);
?>
    <option value="<?php echo $this->_tpl_vars['zone'][$this->_sections['zones']['index']]['id']; ?>
" <?php if (( $this->_tpl_vars['uinfo']['timezone'] == $this->_tpl_vars['zone'][$this->_sections['zones']['index']]['id'] )): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['zone'][$this->_sections['zones']['index']]['offset']; ?>
 Hours</option>
<?php endfor; endif; ?>
</select></div></div><br />

<div class="fieldItem"><label for="email" class="label">Email Address<span class="hintanchor"title="Required"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input name="email" id="email" type="text" size="60" value="<?php echo $this->_tpl_vars['uinfo']['email']; ?>
" class="inputbox" onblur="checkElement('email', 'email', true, 0, 0, '');" /><br /><span class="fieldError" id="emailError">Required:Must be a valid email address</span></div></div><br />
</fieldset>

<fieldset>
<legend>Personal Information</legend>
<div class="fieldItem"><label for="firstname" class="label">First Name<span class="hintanchor"title="Required"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input name="firstname" id="firstname" type="text" size="40" value="<?php echo $this->_tpl_vars['uinfo']['firstname']; ?>
" onblur="checkElement('firstname', 'text', true, 0, 0, '');" class="inputbox" /><br /><span class="fieldError" id="firstnameError">Required</span></div></div><br />
    
<div class="fieldItem"><label for="lastname" class="label">Last Name<span class="hintanchor"title="Required."><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
<div class="inputboxwrapper"><input name="lastname" id="lastname" type="text" size="40" value="<?php echo $this->_tpl_vars['uinfo']['lastname']; ?>
" onblur="checkElement('lastname', 'text', true, 0, 0, '');" class="inputbox" /><br /><span class="fieldError" id="lastnameError">Required</span></div></div><br />
</fieldset>
    
<?php if ($this->_tpl_vars['numfields'] > 0): ?>
<fieldset>
<legend>Additional Information</legend>
    <?php unset($this->_sections['fields']);
$this->_sections['fields']['name'] = 'fields';
$this->_sections['fields']['loop'] = is_array($_loop=$this->_tpl_vars['numfields']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['fields']['show'] = true;
$this->_sections['fields']['max'] = $this->_sections['fields']['loop'];
$this->_sections['fields']['step'] = 1;
$this->_sections['fields']['start'] = $this->_sections['fields']['step'] > 0 ? 0 : $this->_sections['fields']['loop']-1;
if ($this->_sections['fields']['show']) {
    $this->_sections['fields']['total'] = $this->_sections['fields']['loop'];
    if ($this->_sections['fields']['total'] == 0)
        $this->_sections['fields']['show'] = false;
} else
    $this->_sections['fields']['total'] = 0;
if ($this->_sections['fields']['show']):

            for ($this->_sections['fields']['index'] = $this->_sections['fields']['start'], $this->_sections['fields']['iteration'] = 1;
                 $this->_sections['fields']['iteration'] <= $this->_sections['fields']['total'];
                 $this->_sections['fields']['index'] += $this->_sections['fields']['step'], $this->_sections['fields']['iteration']++):
$this->_sections['fields']['rownum'] = $this->_sections['fields']['iteration'];
$this->_sections['fields']['index_prev'] = $this->_sections['fields']['index'] - $this->_sections['fields']['step'];
$this->_sections['fields']['index_next'] = $this->_sections['fields']['index'] + $this->_sections['fields']['step'];
$this->_sections['fields']['first']      = ($this->_sections['fields']['iteration'] == 1);
$this->_sections['fields']['last']       = ($this->_sections['fields']['iteration'] == $this->_sections['fields']['total']);
?>
        <div class="fieldItem"><label for="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
" class="label"><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['query']; ?>
<span class="hintanchor" title="<?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['required']): ?>Required<?php else: ?>Optional<?php endif; ?>::<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['hint']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" alt="[?]"/></span></label>
        <?php $this->assign('name', $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']); ?>
        <div class="inputboxwrapper">
        <?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 1): ?>
            <input name="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
" id="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
" type="text" size="<?php echo smarty_function_math(array('equation' => "x + y",'x' => $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'],'y' => 5), $this);?>
" maxlength="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options']; ?>
" value="<?php echo $this->_tpl_vars['uinfo']['custom'][$this->_tpl_vars['name']]; ?>
" class="inputbox" <?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['required']): ?>onblur="checkElement('<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
', 'text', true, 0, 0, '');"<?php endif; ?> /><?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['required']): ?><br /><span class="fieldError" id="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
Error">Required</span><?php endif; ?>
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 2): ?>
            <textarea name="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
" id="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
" rows="5"  class="inputbox" <?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['required']): ?>onblur="checkElement('<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
', 'text', true, 0, 0, '');"<?php endif; ?>><?php echo $this->_tpl_vars['details']['custom'][$this->_tpl_vars['name']]; ?>
</textarea><?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['required']): ?><br /><span class="fieldError" id="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
Error">Required</span><?php endif; ?>
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 3): ?>
            <?php unset($this->_sections['options']);
$this->_sections['options']['name'] = 'options';
$this->_sections['options']['loop'] = is_array($_loop=$this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][0]+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['options']['start'] = (int)1;
$this->_sections['options']['show'] = true;
$this->_sections['options']['max'] = $this->_sections['options']['loop'];
$this->_sections['options']['step'] = 1;
if ($this->_sections['options']['start'] < 0)
    $this->_sections['options']['start'] = max($this->_sections['options']['step'] > 0 ? 0 : -1, $this->_sections['options']['loop'] + $this->_sections['options']['start']);
else
    $this->_sections['options']['start'] = min($this->_sections['options']['start'], $this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] : $this->_sections['options']['loop']-1);
if ($this->_sections['options']['show']) {
    $this->_sections['options']['total'] = min(ceil(($this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] - $this->_sections['options']['start'] : $this->_sections['options']['start']+1)/abs($this->_sections['options']['step'])), $this->_sections['options']['max']);
    if ($this->_sections['options']['total'] == 0)
        $this->_sections['options']['show'] = false;
} else
    $this->_sections['options']['total'] = 0;
if ($this->_sections['options']['show']):

            for ($this->_sections['options']['index'] = $this->_sections['options']['start'], $this->_sections['options']['iteration'] = 1;
                 $this->_sections['options']['iteration'] <= $this->_sections['options']['total'];
                 $this->_sections['options']['index'] += $this->_sections['options']['step'], $this->_sections['options']['iteration']++):
$this->_sections['options']['rownum'] = $this->_sections['options']['iteration'];
$this->_sections['options']['index_prev'] = $this->_sections['options']['index'] - $this->_sections['options']['step'];
$this->_sections['options']['index_next'] = $this->_sections['options']['index'] + $this->_sections['options']['step'];
$this->_sections['options']['first']      = ($this->_sections['options']['iteration'] == 1);
$this->_sections['options']['last']       = ($this->_sections['options']['iteration'] == $this->_sections['options']['total']);
?>
            <input type="radio" name="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
" id="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
:<?php echo $this->_sections['options']['iteration']; ?>
" value="<?php echo $this->_sections['options']['iteration']; ?>
" <?php if ($this->_tpl_vars['uinfo']['custom'][$this->_tpl_vars['name']] == $this->_sections['options']['iteration']): ?>checked="checked"<?php endif; ?> /><div class="fieldItem"><label for="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
:<?php echo $this->_sections['options']['iteration']; ?>
"><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][$this->_sections['options']['index']]; ?>
</label>
            <?php endfor; endif; ?>
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 4): ?>
            <?php $this->assign('temp', $this->_tpl_vars['uinfo']['custom'][$this->_tpl_vars['name']]); ?>
            <?php unset($this->_sections['options']);
$this->_sections['options']['name'] = 'options';
$this->_sections['options']['loop'] = is_array($_loop=$this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][0]+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['options']['start'] = (int)1;
$this->_sections['options']['show'] = true;
$this->_sections['options']['max'] = $this->_sections['options']['loop'];
$this->_sections['options']['step'] = 1;
if ($this->_sections['options']['start'] < 0)
    $this->_sections['options']['start'] = max($this->_sections['options']['step'] > 0 ? 0 : -1, $this->_sections['options']['loop'] + $this->_sections['options']['start']);
else
    $this->_sections['options']['start'] = min($this->_sections['options']['start'], $this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] : $this->_sections['options']['loop']-1);
if ($this->_sections['options']['show']) {
    $this->_sections['options']['total'] = min(ceil(($this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] - $this->_sections['options']['start'] : $this->_sections['options']['start']+1)/abs($this->_sections['options']['step'])), $this->_sections['options']['max']);
    if ($this->_sections['options']['total'] == 0)
        $this->_sections['options']['show'] = false;
} else
    $this->_sections['options']['total'] = 0;
if ($this->_sections['options']['show']):

            for ($this->_sections['options']['index'] = $this->_sections['options']['start'], $this->_sections['options']['iteration'] = 1;
                 $this->_sections['options']['iteration'] <= $this->_sections['options']['total'];
                 $this->_sections['options']['index'] += $this->_sections['options']['step'], $this->_sections['options']['iteration']++):
$this->_sections['options']['rownum'] = $this->_sections['options']['iteration'];
$this->_sections['options']['index_prev'] = $this->_sections['options']['index'] - $this->_sections['options']['step'];
$this->_sections['options']['index_next'] = $this->_sections['options']['index'] + $this->_sections['options']['step'];
$this->_sections['options']['first']      = ($this->_sections['options']['iteration'] == 1);
$this->_sections['options']['last']       = ($this->_sections['options']['iteration'] == $this->_sections['options']['total']);
?>
            <input type="checkbox" name="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
<?php echo $this->_sections['options']['iteration']; ?>
" id="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
:<?php echo $this->_sections['options']['iteration']; ?>
" value="1" <?php if ($this->_tpl_vars['temp'][$this->_sections['options']['index']] == 1): ?>checked="checked"<?php endif; ?> /><div class="fieldItem"><label for="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
:<?php echo $this->_sections['options']['iteration']; ?>
"><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][$this->_sections['options']['index']]; ?>
</label>&nbsp;
            <?php endfor; endif; ?>
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 5): ?>
            <select name="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
" class="inputbox">
            <?php unset($this->_sections['options']);
$this->_sections['options']['name'] = 'options';
$this->_sections['options']['loop'] = is_array($_loop=$this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][0]+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['options']['start'] = (int)1;
$this->_sections['options']['show'] = true;
$this->_sections['options']['max'] = $this->_sections['options']['loop'];
$this->_sections['options']['step'] = 1;
if ($this->_sections['options']['start'] < 0)
    $this->_sections['options']['start'] = max($this->_sections['options']['step'] > 0 ? 0 : -1, $this->_sections['options']['loop'] + $this->_sections['options']['start']);
else
    $this->_sections['options']['start'] = min($this->_sections['options']['start'], $this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] : $this->_sections['options']['loop']-1);
if ($this->_sections['options']['show']) {
    $this->_sections['options']['total'] = min(ceil(($this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] - $this->_sections['options']['start'] : $this->_sections['options']['start']+1)/abs($this->_sections['options']['step'])), $this->_sections['options']['max']);
    if ($this->_sections['options']['total'] == 0)
        $this->_sections['options']['show'] = false;
} else
    $this->_sections['options']['total'] = 0;
if ($this->_sections['options']['show']):

            for ($this->_sections['options']['index'] = $this->_sections['options']['start'], $this->_sections['options']['iteration'] = 1;
                 $this->_sections['options']['iteration'] <= $this->_sections['options']['total'];
                 $this->_sections['options']['index'] += $this->_sections['options']['step'], $this->_sections['options']['iteration']++):
$this->_sections['options']['rownum'] = $this->_sections['options']['iteration'];
$this->_sections['options']['index_prev'] = $this->_sections['options']['index'] - $this->_sections['options']['step'];
$this->_sections['options']['index_next'] = $this->_sections['options']['index'] + $this->_sections['options']['step'];
$this->_sections['options']['first']      = ($this->_sections['options']['iteration'] == 1);
$this->_sections['options']['last']       = ($this->_sections['options']['iteration'] == $this->_sections['options']['total']);
?>
            <option value="<?php echo $this->_sections['options']['iteration']; ?>
" <?php if ($this->_tpl_vars['uinfo']['custom'][$this->_tpl_vars['name']] == $this->_sections['options']['iteration']): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][$this->_sections['options']['index']]; ?>
</option>
            <?php endfor; endif; ?>
            </select>  
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 6): ?>
            <input name="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
" id="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
" type="text" value="<?php echo $this->_tpl_vars['uinfo']['custom'][$this->_tpl_vars['name']]; ?>
" class="inputbox format-y-m-d highlight-days-67" onblur="checkElement('<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
', 'date', <?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['required']): ?>true<?php else: ?>false<?php endif; ?>, 0, 0, '');"/><br /><span class="fieldError" id="<?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']; ?>
Error"><?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['required']): ?>Required: <?php endif; ?>Must be a valid date in the format YYYY-MM-DD</span>         
        <?php endif; ?>   
        </div></div><br />
    <?php endfor; endif; ?>          
</fieldset>
<?php endif; ?>
    </div>
<div class="submitWrapper"><input type="submit" name="Submit" value="<?php echo $this->_tpl_vars['action']; ?>
" class="button" />
<input name="Cancel" type="button" id="Cancel" value="Cancel" onclick="window.location='admin.php?page=users';" class="button" /></div>
</div></div>
</form>
<?php elseif ($this->_tpl_vars['action'] == 'view'): ?>
<div align="center">
<div class="formlist">
<div class="field">
<fieldset>
<legend>Website Access</legend>
    <div class="fieldItem"><span class="label">Username</span>
    <div class="inputboxwrapper"><?php echo $this->_tpl_vars['uinfo']['uname']; ?>
</div></div><br />
  
    <div class="fieldItem"><span class="label">Groups</span>
    <div class="inputboxwrapper"><?php echo $this->_tpl_vars['uinfo']['team']; ?>
</div></div><br />
  
    <div class="fieldItem"><span class="label">Status</span>
    <div class="inputboxwrapper"><?php if ($this->_tpl_vars['uinfo']['status'] == 1): ?>Active<?php elseif ($this->_tpl_vars['uinfo']['status'] == 0): ?>Inactive<?php else: ?>Blocked<?php endif; ?></div></div><br />
  
    <div class="fieldItem"><span class="label">Email Address</span>
    <div class="inputboxwrapper"><?php echo $this->_tpl_vars['uinfo']['email']; ?>
</div></div><br />
 </fieldset> 
 
<fieldset>
<legend>Personal Information</legend> 
    <div class="fieldItem"><span class="label">First Name</span>
    <div class="inputboxwrapper"><?php echo $this->_tpl_vars['uinfo']['firstname']; ?>
</div></div><br />
  
  
    <div class="fieldItem"><span class="label">Last Name</span>
    <div class="inputboxwrapper"><?php echo $this->_tpl_vars['uinfo']['lastname']; ?>
</div></div><br />
</fieldset>

<?php if ($this->_tpl_vars['numfields'] > 0): ?>
<fieldset>
<legend>Additional Information</legend>
    <?php unset($this->_sections['fields']);
$this->_sections['fields']['name'] = 'fields';
$this->_sections['fields']['loop'] = is_array($_loop=$this->_tpl_vars['numfields']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['fields']['show'] = true;
$this->_sections['fields']['max'] = $this->_sections['fields']['loop'];
$this->_sections['fields']['step'] = 1;
$this->_sections['fields']['start'] = $this->_sections['fields']['step'] > 0 ? 0 : $this->_sections['fields']['loop']-1;
if ($this->_sections['fields']['show']) {
    $this->_sections['fields']['total'] = $this->_sections['fields']['loop'];
    if ($this->_sections['fields']['total'] == 0)
        $this->_sections['fields']['show'] = false;
} else
    $this->_sections['fields']['total'] = 0;
if ($this->_sections['fields']['show']):

            for ($this->_sections['fields']['index'] = $this->_sections['fields']['start'], $this->_sections['fields']['iteration'] = 1;
                 $this->_sections['fields']['iteration'] <= $this->_sections['fields']['total'];
                 $this->_sections['fields']['index'] += $this->_sections['fields']['step'], $this->_sections['fields']['iteration']++):
$this->_sections['fields']['rownum'] = $this->_sections['fields']['iteration'];
$this->_sections['fields']['index_prev'] = $this->_sections['fields']['index'] - $this->_sections['fields']['step'];
$this->_sections['fields']['index_next'] = $this->_sections['fields']['index'] + $this->_sections['fields']['step'];
$this->_sections['fields']['first']      = ($this->_sections['fields']['iteration'] == 1);
$this->_sections['fields']['last']       = ($this->_sections['fields']['iteration'] == $this->_sections['fields']['total']);
?>
        <div class="fieldItem"><span class="label"><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['query']; ?>
</span>
        <?php $this->assign('name', $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['name']); ?>
        <div class="inputboxwrapper">
        <?php if ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 1): ?>
            <?php echo $this->_tpl_vars['uinfo']['custom'][$this->_tpl_vars['name']]; ?>

        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 2): ?>
            <?php echo $this->_tpl_vars['uinfo']['custom'][$this->_tpl_vars['name']]; ?>

        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 3): ?>
            <?php unset($this->_sections['options']);
$this->_sections['options']['name'] = 'options';
$this->_sections['options']['loop'] = is_array($_loop=$this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][0]+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['options']['start'] = (int)1;
$this->_sections['options']['show'] = true;
$this->_sections['options']['max'] = $this->_sections['options']['loop'];
$this->_sections['options']['step'] = 1;
if ($this->_sections['options']['start'] < 0)
    $this->_sections['options']['start'] = max($this->_sections['options']['step'] > 0 ? 0 : -1, $this->_sections['options']['loop'] + $this->_sections['options']['start']);
else
    $this->_sections['options']['start'] = min($this->_sections['options']['start'], $this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] : $this->_sections['options']['loop']-1);
if ($this->_sections['options']['show']) {
    $this->_sections['options']['total'] = min(ceil(($this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] - $this->_sections['options']['start'] : $this->_sections['options']['start']+1)/abs($this->_sections['options']['step'])), $this->_sections['options']['max']);
    if ($this->_sections['options']['total'] == 0)
        $this->_sections['options']['show'] = false;
} else
    $this->_sections['options']['total'] = 0;
if ($this->_sections['options']['show']):

            for ($this->_sections['options']['index'] = $this->_sections['options']['start'], $this->_sections['options']['iteration'] = 1;
                 $this->_sections['options']['iteration'] <= $this->_sections['options']['total'];
                 $this->_sections['options']['index'] += $this->_sections['options']['step'], $this->_sections['options']['iteration']++):
$this->_sections['options']['rownum'] = $this->_sections['options']['iteration'];
$this->_sections['options']['index_prev'] = $this->_sections['options']['index'] - $this->_sections['options']['step'];
$this->_sections['options']['index_next'] = $this->_sections['options']['index'] + $this->_sections['options']['step'];
$this->_sections['options']['first']      = ($this->_sections['options']['iteration'] == 1);
$this->_sections['options']['last']       = ($this->_sections['options']['iteration'] == $this->_sections['options']['total']);
?>
                <?php if ($this->_tpl_vars['uinfo']['custom'][$this->_tpl_vars['name']] == $this->_sections['options']['iteration']): ?><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][$this->_sections['options']['index']]; ?>
<?php endif; ?>
            <?php endfor; endif; ?>
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 4): ?>
            <?php $this->assign('temp', $this->_tpl_vars['uinfo']['custom'][$this->_tpl_vars['name']]); ?>
            <?php if ($this->_tpl_vars['temp']): ?>
            <?php unset($this->_sections['options']);
$this->_sections['options']['name'] = 'options';
$this->_sections['options']['loop'] = is_array($_loop=$this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][0]+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['options']['start'] = (int)1;
$this->_sections['options']['show'] = true;
$this->_sections['options']['max'] = $this->_sections['options']['loop'];
$this->_sections['options']['step'] = 1;
if ($this->_sections['options']['start'] < 0)
    $this->_sections['options']['start'] = max($this->_sections['options']['step'] > 0 ? 0 : -1, $this->_sections['options']['loop'] + $this->_sections['options']['start']);
else
    $this->_sections['options']['start'] = min($this->_sections['options']['start'], $this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] : $this->_sections['options']['loop']-1);
if ($this->_sections['options']['show']) {
    $this->_sections['options']['total'] = min(ceil(($this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] - $this->_sections['options']['start'] : $this->_sections['options']['start']+1)/abs($this->_sections['options']['step'])), $this->_sections['options']['max']);
    if ($this->_sections['options']['total'] == 0)
        $this->_sections['options']['show'] = false;
} else
    $this->_sections['options']['total'] = 0;
if ($this->_sections['options']['show']):

            for ($this->_sections['options']['index'] = $this->_sections['options']['start'], $this->_sections['options']['iteration'] = 1;
                 $this->_sections['options']['iteration'] <= $this->_sections['options']['total'];
                 $this->_sections['options']['index'] += $this->_sections['options']['step'], $this->_sections['options']['iteration']++):
$this->_sections['options']['rownum'] = $this->_sections['options']['iteration'];
$this->_sections['options']['index_prev'] = $this->_sections['options']['index'] - $this->_sections['options']['step'];
$this->_sections['options']['index_next'] = $this->_sections['options']['index'] + $this->_sections['options']['step'];
$this->_sections['options']['first']      = ($this->_sections['options']['iteration'] == 1);
$this->_sections['options']['last']       = ($this->_sections['options']['iteration'] == $this->_sections['options']['total']);
?>
                <?php if ($this->_tpl_vars['temp'][$this->_sections['options']['index']] == 1): ?><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][$this->_sections['options']['index']]; ?>
<?php endif; ?><?php if ($this->_sections['options']['iteration'] < ( $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][0]+1 )): ?>, <?php endif; ?>
            <?php endfor; endif; ?>
            <?php endif; ?>
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 5): ?>
            <?php unset($this->_sections['options']);
$this->_sections['options']['name'] = 'options';
$this->_sections['options']['loop'] = is_array($_loop=$this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][0]+1) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['options']['start'] = (int)1;
$this->_sections['options']['show'] = true;
$this->_sections['options']['max'] = $this->_sections['options']['loop'];
$this->_sections['options']['step'] = 1;
if ($this->_sections['options']['start'] < 0)
    $this->_sections['options']['start'] = max($this->_sections['options']['step'] > 0 ? 0 : -1, $this->_sections['options']['loop'] + $this->_sections['options']['start']);
else
    $this->_sections['options']['start'] = min($this->_sections['options']['start'], $this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] : $this->_sections['options']['loop']-1);
if ($this->_sections['options']['show']) {
    $this->_sections['options']['total'] = min(ceil(($this->_sections['options']['step'] > 0 ? $this->_sections['options']['loop'] - $this->_sections['options']['start'] : $this->_sections['options']['start']+1)/abs($this->_sections['options']['step'])), $this->_sections['options']['max']);
    if ($this->_sections['options']['total'] == 0)
        $this->_sections['options']['show'] = false;
} else
    $this->_sections['options']['total'] = 0;
if ($this->_sections['options']['show']):

            for ($this->_sections['options']['index'] = $this->_sections['options']['start'], $this->_sections['options']['iteration'] = 1;
                 $this->_sections['options']['iteration'] <= $this->_sections['options']['total'];
                 $this->_sections['options']['index'] += $this->_sections['options']['step'], $this->_sections['options']['iteration']++):
$this->_sections['options']['rownum'] = $this->_sections['options']['iteration'];
$this->_sections['options']['index_prev'] = $this->_sections['options']['index'] - $this->_sections['options']['step'];
$this->_sections['options']['index_next'] = $this->_sections['options']['index'] + $this->_sections['options']['step'];
$this->_sections['options']['first']      = ($this->_sections['options']['iteration'] == 1);
$this->_sections['options']['last']       = ($this->_sections['options']['iteration'] == $this->_sections['options']['total']);
?>
                <?php if ($this->_tpl_vars['uinfo']['custom'][$this->_tpl_vars['name']] == $this->_sections['options']['iteration']): ?><?php echo $this->_tpl_vars['fields'][$this->_sections['fields']['index']]['options'][$this->_sections['options']['index']]; ?>
<?php endif; ?>
            <?php endfor; endif; ?>
        <?php elseif ($this->_tpl_vars['fields'][$this->_sections['fields']['index']]['type'] == 6): ?>
            <?php echo $this->_tpl_vars['uinfo']['custom'][$this->_tpl_vars['name']]; ?>
           
        <?php endif; ?>   
        </div></div><br />
    <?php endfor; endif; ?>          
</fieldset>
<?php endif; ?>
</div> 
<div class="submitWrapper"><input type="button" class="button" value="Back" onclick="history.go(-1);" /></div>
</div></div>
<?php endif; ?>